d = {
    'key':'value',
    123:'456',
    867:['编程猫','三里汇'],

}
for k,v in d.items():
    print(k,v)

a = {
    '福建':{
        '厦门':['湖里','思明','集美','惠安'],
        '泉州':['晋江','泉港','石狮'],
    }
}
#找出厦门所有的区
# for k,v in a.items():
#     print(v)
#     for i,j in v.items():#in福建？
#         if i == '厦门':
#             print(j)
# #找出晋江在哪个市
# for k,v in a.items():
#     for i,j in v.items():
#         if '泉港' in j:#
#             print(i)
#修改
for k,v in a.items():
    print(v['厦门'])
    if '厦门' in v:
        v['厦门'].remove('惠安')
        print(v['厦门'])
    if '泉州' in v:
        v['泉州'].append('惠安')
